It is recommended that each user be assigned a personal database account with only the required privileges. For more information on User Access Control and Account Management, please refer to the MySQL Reference Manual.
Note, this topic only provides instructions for performing the setup on the same computer as MySQL since remote administrative access is disabled by default. All instructions assume that the MySQL Server version is 8.4 and the root account is being used for MySQL administration.
Perform the following steps for any user that will need access to the pdfkeeper database. Substitute the user name, host name, and password for user_name, host_name, password.
Open a Command Prompt.
Execute "C:\Program Files\MySQL\MySQL Server 8.4\bin\mysql.exe" -u root -p
Enter the password when prompted.
For a new user, enter the following statement: create user 'user_name'@'host_name' identified by 'password'; For more information, see the MySQL Reference Manual.
Enter use pdfkeeper;
For a new account, enter the following statement to grant the user select/query access: grant select on docs to 'user_name'@'host_name';
To give the user the ability to upload documents, enter the following statement: grant insert on docs to 'user_name'@'host_name';
To give the user the ability to update documents, enter the following statement: grant update on docs to 'user_name'@'host_name';
To give the user the ability to delete documents, enter the following statement: grant delete on docs to 'user_name'@'host_name';
To prevent the user from uploading documents, enter the following statement: revoke insert on docs from 'user_name'@'host_name';
To prevent the user from updating documents, enter the following statement: revoke update on docs from 'user_name'@'host_name';
To prevent the user from deleting documents, enter the following statement: revoke delete on docs from 'user_name'@'host_name';